/**
 * 
 */
package org.yelongframework.model.support.spring.beans.propertyeditors;

import java.beans.PropertyEditorSupport;

import org.apache.commons.lang3.StringUtils;
import org.yelongframework.model.property.nulls.ModelNullProperty;

/**
 * 自定义模型字符串装订器
 * 
 * @since 1.0.0
 */
public class ModelCustomStringEditor extends PropertyEditorSupport {

	@Override
	public void setAsText(String text) throws IllegalArgumentException {
		if (StringUtils.isBlank(text)) {
			super.setValue(ModelNullProperty.STRING_NULL);
		} else {
			super.setValue(text);
		}
	}

}
